package com.java.al.properties;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ReadConfig {
	Properties pr = new Properties();
	
	public void readConfig(String name){
		InputStream input = null;
		try {
			input = ReadConfig.class.getResourceAsStream(name);
			pr.load(input);
		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			if (input!=null) {
				try {
					input.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
		
		String str = pr.getProperty("01");
		System.out.println( str );
	}
	public static void main(String[] args) {
		ReadConfig rc = new ReadConfig();
		rc.readConfig("config.properties");
	}
}
